package com.techstar.ats.status;

import java.util.Set;

public enum RtuStatus implements StatusEnumerated {
	DOWN(0x00008000, "通信中断"),
	IN_LOCAL_CTRL(0x00000001, "站控"),
	IN_CENTRAL_CTRL(0x00000002, "遥控"),
	IN_EMERGENCY_CTRL(0x00000004, "紧急站控");

	private final int value;
	private final String literal;

	RtuStatus(int value, String literal) {
		this.value = value;
		this.literal = literal;
	}

	@Override
	public int value() {
		return this.value;
	}

	@Override
	public String literal() {
		return this.literal;
	}

	public static Set<RtuStatus> valueOf(int mask) {
		return StatusEnumerated.valueOf(RtuStatus.class, mask);
	}
}
